package com.shinbada.modules.sys.entity;

import com.shinbada.config.properties.ShinProperites;
import com.shinbada.core.persistence.DataEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 系统配置Entity
 *
 * @author initcap
 * @date 2020/10/15 16:33
 */
@Data
@ApiModel("系统配置")
public class SysSetting extends DataEntity<SysSetting> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("邮箱服务器地址")
    private String smtp;

    @ApiModelProperty("邮箱服务器端口")
    private String port;

    @ApiModelProperty("系统邮箱地址")
    private String mailName;

    @ApiModelProperty("系统邮箱密码")
    private String mailPassword;

    @ApiModelProperty("此处需要替换成开发者自己的AK(在阿里云访问控制台寻找);")
    private String accessKeyId;

    @ApiModelProperty("此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)")
    private String accessKeySecret;

    @ApiModelProperty("必填:短信签名-可在短信控制台中找到")
    private String signature;

    @ApiModelProperty("必填:短信模板-可在短信控制台中找到")
    private String templateCode;

    @ApiModelProperty("默认主题颜色")
    private String defaultTheme;

    @ApiModelProperty("默认主题风格")
    private String defaultThemeStyle;

    @ApiModelProperty("导航模式")
    private String defaultLayout;

    @ApiModelProperty("是否打开多页签功能")
    private String openTab;

    @ApiModelProperty("产品logo")
    private String logo;

    @ApiModelProperty("产品logo长图")
    private String logoLong;

    @ApiModelProperty("是否使用代理: true 使用，false 不使用")
    private String useProxy;

    @ApiModelProperty("系统外网代理地址")
    private String proxyHost;

    @ApiModelProperty("系统外网代理端口")
    private Integer proxyPort;

    @ApiModelProperty("企业微信corp")
    private String weixinCorpId;

    @ApiModelProperty("企业微信corpSecret")
    private String weixinCorpSecret;

    @ApiModelProperty("企业微信应用agentId")
    private String weixinAgentId;

    @ApiModelProperty("企业微信应用消息模版")
    private String weixinTemplate;

    @ApiModelProperty("腕表通知ip")
    private String wanbiaoIp;

    @ApiModelProperty("腕表通知端口")
    private String wanbiaoPort;

    @ApiModelProperty("腕表通知格式多行文本，因为可能有回车符号:[SendMessageByID]$$${watchAddress}$${msg}$\n")
    private String wanbiaoTemplate;

    public SysSetting() {
        super();
    }

    public SysSetting(String id) {
        super(id);
    }

    public boolean useProxy() {
        return ShinProperites.TRUE.equals(this.useProxy);
    }

}